<div id="" style="" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
    <div style="display: block; float: left;">
    <?php
    $this->widget('ext.CPotatoMenu.CPotatoMenu', array(
//        'style' => 'default', // or default or navbar
        'items' => array(
            array('label' => Yii::t('application', 'Home'), 'url' => array('/site/index'), 'itemOptions' => array('style' => 'width: auto;')),
            array('label' => Yii::t('application', 'Configuration'), 'url' => '#', 'submenuOptions' => array('id' => 'myId'), 'itemOptions' => array('style' => 'width: auto;'), 'visible' => Yii::app()->getModule('user')->isAdmin(), 'items' => array(
                array('label' => Yii::t('application', 'Account'), 'url' => '#', 'submenuOptions' => array('id' => 'myId'), 'itemOptions' => array('style' => 'width: 125px;'), 'visible' => Yii::app()->getModule('user')->isAdmin(), 'items' => array(
                    array('label' => Yii::t('application', 'Acgroup'), 'url' => '#', 'linkOptions' => array('onclick' => 'add_tab("acgroup", "' . CController::createUrl('acgroup/admin', array('isAjaxRequest' => 1)) . '", "' . Yii::t('application', 'Acgroup') . '");'), 'itemOptions' => array('style' => 'width: 175px;')),
                    array('label' => Yii::t('application', 'Acledger'), 'url' => '#', 'linkOptions' => array('onclick' => 'add_tab("acledger", "' . CController::createUrl('acledger/admin', array('isAjaxRequest' => 1)) . '", "' . Yii::t('application', 'Acledger') . '");'), 'itemOptions' => array('style' => 'width: 175px;')),
                )),
                array('label' => Yii::t('application', 'Inventory'), 'url' => '#', 'submenuOptions' => array('id' => 'myId'), 'itemOptions' => array('style' => 'width: 125px;'), 'visible' => Yii::app()->getModule('user')->isAdmin(), 'items' => array(
                    array('label' => Yii::t('application', 'Stockgroup'), 'url' => '#', 'linkOptions' => array('onclick' => 'add_tab("stockgroup", "' . CController::createUrl('stockgroup/admin', array('isAjaxRequest' => 1)) . '", "' . Yii::t('application', 'Stockgroup') . '");'), 'itemOptions' => array('style' => 'width: 175px;')),
                    array('label' => Yii::t('application', 'Stockitems'), 'url' => '#', 'linkOptions' => array('onclick' => 'add_tab("stockitems", "' . CController::createUrl('stockitems/admin', array('isAjaxRequest' => 1)) . '", "' . Yii::t('application', 'Stockitems') . '");'), 'itemOptions' => array('style' => 'width: 175px;')),
                    array('label' => Yii::t('application', 'Measure'), 'url' => '#', 'linkOptions' => array('onclick' => 'add_tab("measure", "' . CController::createUrl('measure/admin', array('isAjaxRequest' => 1)) . '", "' . Yii::t('application', 'Measure') . '");'), 'itemOptions' => array('style' => 'width: 175px;')),
                )),
            )),
//            array('label' => Yii::t('application', 'Casereg'), 'url' => '#', 'linkOptions' => array('onclick' => 'add_tab("casereg", "' . CController::createUrl('casereg/admin', array('isAjaxRequest' => 1)) . '", "' . Yii::t('application', 'Casereg') . '");'), 'itemOptions' => array('style' => 'width: 100%;')),
            array('url' => Yii::app()->getModule('user')->loginUrl, 'label' => Yii::app()->getModule('user')->t("Login"), 'visible' => Yii::app()->user->isGuest, 'itemOptions' => array('style' => 'width: auto;')),
            array('url' => Yii::app()->getModule('user')->logoutUrl, 'label' => Yii::app()->getModule('user')->t("Logout") . ' (' . Yii::app()->user->name . ')', 'visible' => !Yii::app()->user->isGuest, 'itemOptions' => array('style' => 'width: auto;')),
//				array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
//				array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
        ),
            )
    );
    ?>
    </div>        
    <div style="display: block; float: right; padding: 7px; margin-right: 15px;">
                <?php
                echo "<span id='transactiondate_span' style='padding-right: 10px;'>(". Yii::app()->getModule('user')->user()->profile->transactiondate .")</span>";
                
                
                
                $this->widget('zii.widgets.jui.CJuiDatePicker', array(
//                    'id' => 'datebail',
                    'name' => 'transactiondate',
                    'value'=>Yii::app()->getModule('user')->user()->profile->transactiondate,
//                    'value' => '08/20/2010',
                    'theme' => 'bgscstpc',                    
                    'options' => array(
                        'dateFormat'=>'yy-mm-dd',
                        'showOn' => "button",
                        'buttonImage' => "images/calendar.gif",
                        'buttonImageOnly' => true,
                        'showAnim' => 'fold',

// user will be able to change month and year
	            'changeMonth' => 'true',
	            'changeYear' => 'true',
	 
	            // shows the button panel under the calendar (buttons like "today" and "done")
	            'showButtonPanel' => 'true',
	 
	            // this is useful to allow only valid chars in the input field, according to dateFormat
	            'constrainInput' => 'false',      
                    'onSelect' => 'js:function(dateText, inst){
//                            alert(dateText);
                            $.ajax({
                                type: "POST",
                                dataType: "json",
                                url: "' .$this->createUrl('site/transactiondate').'&transactiondate=" + dateText +"&user_id='.Yii::app()->getModule('user')->user()->profile->user_id.'",
                            }).done(function( msg ) {
                                $("#transactiondate_span").text("(" + dateText + ")");
                                //alert( "Data Saved: " + msg );
                            });                            
                        }',
                    ),
                    'htmlOptions' => array(
                        'class' => 'date'
                    )
                ));
                ?>       
        
        <script>
            $("#transactiondate").hide();
        </script>
        
    </div>
</div>        